// src/store/counter.ts
import { defineStore } from 'pinia'
import { reactive } from 'vue'

// 定义 Store 的类型
interface RouterState {
  count: number
}

// 使用 defineStore 创建 Store
export const useRouterStore = defineStore('dynamicRoutes',()=> {
  const dynamicRoutes=reactive([])
    const setRouters=(value:[])=>{dynamicRoutes.length=0;dynamicRoutes.push(...value)}
    return {dynamicRoutes,setRouters}
},{persist:true})
